$(document).ready(function(){                    
    var canvas = document.getElementById('canvas');
    var stage = new JTopo.Stage(canvas);
    //显示工具栏
    showJTopoToobar(stage);
    var scene = new JTopo.Scene();    
    stage.showToolbar = false;
    scene.mode = 'select';
    scene.setBackground('./img/win7/desktop.png');
    
    var node = new JTopo.Node("计算机");                            
    node.setImage('./img/win7/mycomputer.png', true);
    node.setLocation(20, 30);
    scene.add(node);
    
    var recycleNode = new JTopo.Node("回收站");                            
    recycleNode.setImage('./img/win7/recycle.png', true);
    recycleNode.setLocation(20, 30+72);
    scene.add(recycleNode);            
            
    for(var i=1; i<3; i++){
        for(var j=0; j<2; j++){
            var node = new JTopo.Node();                                
            if(Math.random() > 0.7){
                node.setImage('./img/win7/word.png', true);
                node.text = "文档";
            }else if(Math.random() > 0.3){
                node.setImage('./img/win7/folder.png', true);
                node.text = "文件夹"+i+'-'+j;
            }else{
                node.setImage('./img/win7/excel.png', true);
                node.text = "表格";
            }
            node.setLocation(20 + i*72, 30 + j*72);
            scene.add(node);        
        }
    }
    stage.add(scene);
});